<?php
/**
 * 主播
 */
namespace App\Http\Controllers;

use App\Service\AgentService;
use App\Validation\AgentValidation;

class AgentController extends BaseController
{

	//认证信息
    public function detailAction()
    {
		$this->getUser();
		$data = AgentService::getInfo($this->user->member_id);
		return  $this->echoJson($data);
    }
	
	//申请认证
	public function authAction()
	{
		$this->getUser();
		$raw = $this->validation(new AgentValidation, $this->request->getJsonRawBody());
		$data = AgentService::save($raw);
		return $this->echoJson('ok');
	}


}